package com.auxgroup.smarthome.enterpriseapi.responsebody;

import java.util.List;
import java.util.Objects;

/**
 * WIFI设备
 * Created by Toby Lai on 2017/6/12.
 */
public class WIFIDeviceList extends AbstractErrorBody {

    private MetaBean meta;

    private List<WIFIDeviceInfo> objects;

    public MetaBean getMeta() {
        return meta;
    }

    public void setMeta(MetaBean meta) {
        this.meta = meta;
    }

    public List<WIFIDeviceInfo> getObjects() {
        return objects;
    }

    public void setObjects(List<WIFIDeviceInfo> objects) {
        this.objects = objects;
    }


    public static class WIFIDeviceInfo {

        private String did;
        private String mac;
        private boolean is_online; //是否在线,在线为1,不在线为0
        private boolean is_faulty; //是否故障,故障为1,无故障为0
        private boolean is_alert;//是否报警,报警为1,无报警为0
        private long online_latest; // 最近上线时间
        private String mcu_hard_version; // mcu硬件版本
        private String mcu_soft_version; // mcu软件版本
        private String wifi_soft_version; // WIFI固件软件版本
        private String wifi_hard_version; // WIFI硬件版本
        private String country;
        private String region;
        private String city;
        private String longitude;
        private String latitude;
        private String remark;
        private long created_at;

        public String getDid() {
            return did;
        }

        public void setDid(String did) {
            this.did = did;
        }

        public String getMac() {
            return mac;
        }

        public void setMac(String mac) {
            this.mac = mac;
        }

        public boolean isIs_online() {
            return is_online;
        }

        public void setIs_online(boolean is_online) {
            this.is_online = is_online;
        }

        public boolean isIs_faulty() {
            return is_faulty;
        }

        public void setIs_faulty(boolean is_faulty) {
            this.is_faulty = is_faulty;
        }

        public boolean isIs_alert() {
            return is_alert;
        }

        public void setIs_alert(boolean is_alert) {
            this.is_alert = is_alert;
        }

        public long getOnline_latest() {
            return online_latest;
        }

        public void setOnline_latest(long online_latest) {
            this.online_latest = online_latest;
        }

        public String getMcu_hard_version() {
            return mcu_hard_version;
        }

        public void setMcu_hard_version(String mcu_hard_version) {
            this.mcu_hard_version = mcu_hard_version;
        }

        public String getMcu_soft_version() {
            return mcu_soft_version;
        }

        public void setMcu_soft_version(String mcu_soft_version) {
            this.mcu_soft_version = mcu_soft_version;
        }

        public String getWifi_soft_version() {
            return wifi_soft_version;
        }

        public void setWifi_soft_version(String wifi_soft_version) {
            this.wifi_soft_version = wifi_soft_version;
        }

        public String getWifi_hard_version() {
            return wifi_hard_version;
        }

        public void setWifi_hard_version(String wifi_hard_version) {
            this.wifi_hard_version = wifi_hard_version;
        }

        public String getCountry() {
            return country;
        }

        public void setCountry(String country) {
            this.country = country;
        }

        public String getRegion() {
            return region;
        }

        public void setRegion(String region) {
            this.region = region;
        }

        public String getCity() {
            return city;
        }

        public void setCity(String city) {
            this.city = city;
        }

        public String getLongitude() {
            return longitude;
        }

        public void setLongitude(String longitude) {
            this.longitude = longitude;
        }

        public String getLatitude() {
            return latitude;
        }

        public void setLatitude(String latitude) {
            this.latitude = latitude;
        }

        public long getCreated_at() {
            return created_at;
        }

        public void setCreated_at(long created_at) {
            this.created_at = created_at;
        }

        public String getRemark() {
            return remark;
        }

        public void setRemark(String remark) {
            this.remark = remark;
        }

        @Override
        public boolean equals(Object o) {
            if (this == o) return true;
            if (o == null || getClass() != o.getClass()) return false;
            WIFIDeviceInfo that = (WIFIDeviceInfo) o;
            return Objects.equals(mac, that.mac);
        }

        @Override
        public int hashCode() {
            return Objects.hash(mac);
        }
    }



}
